package esmp.jtt808.model.terminal;

import common.utils.DataPackUtil;
import esmp.jtt808.model.Decoder;

/**
 * Created by dave on 18-7-20 下午4:11.
 * 终端鉴权，0x0102
 */
public class TerminalAuth implements Decoder<TerminalAuth> {
    private String auth;    // 终端鉴权码，终端重连后上报鉴权码

    @Override
    public TerminalAuth decode(byte[] bytes, int start, int end) {
        auth = DataPackUtil.bytesToString(bytes, start, end);
        return this;
    }

    public String getAuth() {
        return auth;
    }

    public void setAuth(String auth) {
        this.auth = auth;
    }
}
